package jsyf.oa.entity.doc;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by Maqiuqiu on 2018/4/25.
 */
@Entity
@Table(name = "T_DOC_ATTACH_HISTORY", schema = "oa", catalog = "")
public class AttachHistoryEntity extends BaseEntity implements Serializable {

    private String mainId;
    private String attachName;
    private String attachUrl;
    private String imageName;
    private String imageUrl;
    private String createUserId;

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getAttachName() {
        return attachName;
    }

    public void setAttachName(String attachName) {
        this.attachName = attachName;
    }

    public String getAttachUrl() {
        return attachUrl;
    }

    public void setAttachUrl(String attachUrl) {
        this.attachUrl = attachUrl;
    }

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String imageName) {
        this.imageName = imageName;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID",getId());
        obj.put("MAIN_ID",getMainId());
        obj.put("ATTACH_NAME",getAttachName());
        obj.put("ATTACH_URL",getAttachUrl());
        obj.put("IMAGE_NAME",getImageName());
        obj.put("IMAGE_URL",getImageUrl());
        obj.put("CREATE_USER_ID",getCreateUserId());
        obj.put("CREATE_TIME",getCreateTime());
        return  obj;
    }

    @Override
    public String getTableName() {
        return "t_doc_attach_history";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID","id");
        obj.put("MAIN_ID","mainId");
        obj.put("ATTACH_NAME","attachName");
        obj.put("ATTACH_URL","attachUrl");
        obj.put("IMAGE_NAME","imageName");
        obj.put("IMAGE_URL","imageUrl");
        obj.put("CREATE_USER_ID","createUserId");
        obj.put("CREATE_TIME","createTime");
        return  obj;
    }
}
